import torch
import numpy as np
import os


def gen_golden_data_simple():
    input_shape = [3, 4, 224, 224]
    start = np.random.uniform(-10, 10, input_shape).astype(np.float32)
    end = np.random.uniform(-10, 10, input_shape).astype(np.float32)
    weight = np.random.uniform(0, 1, input_shape).astype(np.float32)
    res = torch.lerp(torch.Tensor(start), torch.Tensor(end), torch.Tensor(weight))

    golden = res.numpy().astype(np.float32)
    print(golden)
    os.system("mkdir -p input")
    os.system("mkdir -p output")
    start.tofile("./input/input_start.bin")
    end.tofile("./input/input_end.bin")
    weight.tofile("./input/input_weight.bin")
    golden.tofile("./output/golden.bin")


if __name__ == "__main__":
    gen_golden_data_simple()
